<template>
  <el-table-column type="expand">
    <template slot-scope="props">
      <div class="expand-row">
        <div class="info-block">
          <div class="title">
            订单基本信息
          </div>
          <div class="content">
            <el-row>
              <el-col :span="6">
                <div class="item">
                  <div class="label">订单号</div>
                  <div>{{props.row.id}}</div>
                </div>
              </el-col>
              <el-col :span="6">
                <div class="item">
                  <div class="label">客户</div>
                  <div>{{props.row.customerName}}</div>
                </div>
              </el-col>
              <el-col :span="6">
                <div class="item">
                  <div class="label">产品</div>
                  <div>{{props.row.prodName}}</div>
                </div>
              </el-col>

            </el-row>
            <el-row>
              <el-col :span="6">
                <div class="item">
                  <div class="label">业务员</div>
                  <div>{{props.row.empName?props.row.empName:'暂无'}}</div>
                </div>
              </el-col>
              <el-col :span="6">
                <div class="item">
                  <div class="label">价格</div>
                  <div>{{props.row.price?props.row.price+'元':'暂无'}}</div>
                </div>
              </el-col>
              <el-col :span="6">
                <div class="item">
                  <div class="label">订单状态</div>
                  <div>{{props.row.statusDesc}}</div>
                </div>
              </el-col>

            </el-row>
            <el-row>
              <el-col :span="6">
                <div class="item">
                  <div class="label">创建时间</div>
                  <div>{{props.row.createTime}}</div>
                </div>
              </el-col>
            </el-row>
          </div>
        </div>
        <div class="info-block" v-if="props.row.tasks">
          <div class="title">
            订单服务跟踪
          </div>
          <div class="content">
            <el-row v-for="task in props.row.tasks">
              <el-col :span="16">
                <div class="item">
                  <div class="label" style="width: 100px">{{task.prodTaskName}}</div>
                  <div style="flex: 1;margin-top: -6px">
                    <el-steps :active="getActiveStep(task.status)">
                      <el-step v-for="status in ORDER_TASK_STATUS" :title="status.name"></el-step>
                    </el-steps>
                  </div>
                </div>
              </el-col>
            </el-row>

          </div>
        </div>
      </div>
    </template>
  </el-table-column>


  <el-table-column
    label="价格">
    <template slot-scope="scope">
          <span class="t-link"
                v-if="scope.row.status === ORDER_STATUS.QUOTATION "
                @click="showUpdatePriceDialog(scope.row,'订单报价')">
            <span>去报价</span>
          </span>
      <span v-else>{{scope.row.price?scope.row.price+'元':'暂无'}}</span>
      <span class="t-link"
            v-if="scope.row.status === ORDER_STATUS.NOTPAY"
            @click="showUpdatePriceDialog(scope.row,'修改报价')">
            <span>去修改</span>
          </span>
    </template>
  </el-table-column>
</template>

<script>
  export default {
    name: 'bak.vue'
  }
</script>

<style scoped>

</style>
